#ifndef __COOLING_H__
#define __COOLING_H__

#include <Arduino.h>

#include "Storage.h"
#include "Actuator.h"
#include "Commander.h"

class Cooling : public Actuator, public CommandProcessor {
private:
    bool active;
    uint8_t pin;
    float tempThreshold;

private:
    void updateState(bool active);

public:
    Cooling(uint8_t pin);

public:
    const bool isActive() const;

public:
    virtual const error_t begin();

    virtual const error_t tick(const tick_t ticks, const time_t time);

public:
    virtual const bool isSupported(String const &request);

    virtual const error_t processCommand(String const &request, String &response);
};

#endif